SRC=$(shell ls *.c)
OBJ=$(SRC:.c=.o)
BIN=exe

$(BIN):$(OBJ)
	@gcc -o $@ $^
	@echo "linking... $^ to $@"
%.o:%.c
	@gcc -c $<
	@echo "compiling... $< to $@"

.PHONY:
clean:
	@rm -f $(OBJ) $(BIN)
